<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<table border="0" cellpadding="0" cellspacing="0">
    <input type="hidden" name="idProd" value="${idProd}" />
    <tr><td>:: List Of Produks ::</td></tr>
    <tr>
        <td>No.</td>
        <td>Code</td>
        <td>Name</td>
        <td>Weight</td>
        <td>Type's Name</td>
        <td>Unit's Name</td>
        <td>Quantity</td>
        <td>Actions</td>
    </tr>
    <c:set var="x" value="0"/>
    <c:forEach items="${produks}" var="prod">
        <tr>
            <td>${x+1}.</td>
            <td>${prod.kode}</td>
            <td>${prod.nama}</td>
            <td>${prod.weight}</td>
            <td>${prod.hargaHpp.jenis.nama}</td>
            <td>${prod.hargaHpp.unit.nama}</td>
            <td><input type="text" name="quantity" value=""/></td>
            <td>
                <html:link action="/prod_savematerialinproduk.do?id=${prod.id}">Add</html:link>
            </td>
        </tr>
        <c:set var="x" value="${x+1}"/>
    </c:forEach>
</table>